<template>
  <div class='container'>
 <h2 style="margin:5px 0">{{previewList.title}}</h2>
 <span>{{previewList.createTime | forMat('YYYY-MM-DD hh:mm:ss') }}</span>
 <span>超级管理员</span>
 <span> <i class="el-icon-view" style="margin-right:3px"></i> {{previewList.visits}}</span>
 <div class="amount" v-html="previewList.articleBody"></div>
   </div>
</template>

<script>
import { detail } from '@/api/hmmm/articles'
export default {
  props: {
    id: {
      type: Number,
      default: null
    }
  },
  data () {
    return {
      previewList: {
        articleBody: '<p>ASDASDSA</p>',
        createTime: '2022-01-21T02:27:21.000Z',
        creatorID: 2,
        state: 1,
        title: 'SADSA',
        videoURL: '',
        visits: 0
      }
    }
  },
  async created () {
    this.getDetail()
  },
  methods: {
    async getDetail () {
      const res = await detail({ id: this.id })
      console.log(res, 124356798)
      this.previewList = res.data
    }

  }
}
</script>

<style scoped lang='scss'>
 .container {
    // height: 160px;
    margin-top: 3px;
    span {
      margin-right: 8px;
    }
    .amount {
      height: 70px;
      line-height: 40px;
      margin-top:10px ;
      margin-bottom:20px ;
      padding:0px 16px;
      border-top:#dad9d9 dashed  1px;
       background-color: #f5f5f5;
       color: #404142;
    }
  }
</style>
